Skip to main content
Version: 3.x.x

SocketAdapterOptionsType


import { SocketAdapterOptionsType } from "@hyper-fetch/sockets"

Description

Defined in socket/socket.types.ts:21

Preview

type SocketAdapterOptionsType<SocketAdapterType> = (SocketOptionsType<SocketAdapterType> & { adapterOptions?: SSEAdapterOptionsType; isSSE: true }) | (SocketOptionsType<SocketAdapterType> & { adapterOptions?: WSAdapterOptionsType });

Structure

{adapter:SocketAdapterType,auth:Record<string, QueryParamType>,autoConnect:boolean,queryParams:\Record<string, QueryParamType>\ | \string\,queryParamsConfig:{arrayFormat:\bracket\ | \index\ | \comma\ | \separator\ | \bracket-separator\ | \none\,arraySeparator:string,encode:boolean,skipEmptyString:boolean,skipNull:boolean,strict:boolean},queryParamsStringify:(queryParams: \QueryParamsType\ | \string\ | \NegativeTypes\) => string,reconnect:number,reconnectTime:number,url:string,adapterOptions:{eventSourceInit:EventSourceInit,reconnectTimeout:number},isSSE:true} | {adapter:SocketAdapterType,auth:Record<string, QueryParamType>,autoConnect:boolean,queryParams:\Record<string, QueryParamType>\ | \string\,queryParamsConfig:{arrayFormat:\bracket\ | \index\ | \comma\ | \separator\ | \bracket-separator\ | \none\,arraySeparator:string,encode:boolean,skipEmptyString:boolean,skipNull:boolean,strict:boolean},queryParamsStringify:(queryParams: \QueryParamsType\ | \string\ | \NegativeTypes\) => string,reconnect:number,reconnectTime:number,url:string,adapterOptions:{heartbeat:boolean,heartbeatMessage:string,pingTimeout:number,pongTimeout:number,protocols:string[],reconnectTimeout:number}}